package com.combat.text.config;

import com.baomidou.mybatisplus.core.metadata.IPage;

import java.io.Serializable;
import java.util.List;

/**
 * @author KangJx
 * @date 2020/12/16
 */
public class LayuiPage<T> implements Serializable {

    private int code;

    private String msg;

    private List<T> data;

    private long count;


    public LayuiPage(IPage<T> ip){
        this.code = 0;
        this.msg = "success";
        this.count = ip.getTotal();
        this.data = ip.getRecords();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }
}
